<template>
  <el-input v-model="input" placeholder="请输入学号" style="width:20%" />
  <el-button>
    <el-icon>
      <Search />
    </el-icon>
  </el-button>
  <el-button type="primary" @click="addstudentdialog = true">添加学生资料</el-button>


  <el-table :data="StudentTable" border stripe style="width: 100%">
    <el-tableColumn label="学号" prop="sno"></el-tableColumn>
    <el-tableColumn label="姓名" prop="name"></el-tableColumn>
    <el-tableColumn label="性别" prop="gender"></el-tableColumn>
    <el-tableColumn label="学院" prop="academy"></el-tableColumn>
    <el-tableColumn label="专业" prop="major"></el-tableColumn>
    <el-tableColumn label="班级" prop="classes"></el-tableColumn>
    <el-tableColumn label="操作" prop="operation">
      <el-button type="primary" plain size="mini" @click="editstudentdialog = true">
        <el-icon>
          <Edit />
        </el-icon>
      </el-button>
      <el-button type="danger" plain size="mini" @click="deletestudentdialog = true">
        <el-icon>
          <Delete />
        </el-icon>
      </el-button>
    </el-tableColumn>
  </el-table>

  <!-- <el-dialog title="添加学生资料" v-model="addstudentdialog" width="50%">
    <el-form label-width="70px">

      <el-form-item label="学号">
        <el-input v-model="sno" placeholder="请输入学号"></el-input>
      </el-form-item>

      <el-form-item label="姓名">
        <el-input v-model="name" placeholder="请输入姓名"></el-input>
      </el-form-item>

      <el-form-item label="性别">
        <el-input v-model="gender" placeholder="请输入性别"></el-input>
      </el-form-item>

      <el-form-item label="学院">
        <el-input v-model="academy" placeholder="请输入学院"></el-input>
      </el-form-item>

      <el-form-item label="专业">
        <el-input v-model="major" placeholder="请输入专业"></el-input>
      </el-form-item>

      <el-form-item label="班级">
        <el-input v-model="classes" placeholder="请输入班级"></el-input>
      </el-form-item>

    </el-form>
    <span slot="footer" class="dialog-footer">
      <el-button @click="addstudentdialog = false">取 消</el-button>
      <el-button type="primary" >确 定</el-button>
    </span>
  </el-dialog>
  <el-dialog title="修改学生资料" v-model="editstudentdialog" width="50%">
    <el-form label-width="70px">

      <el-form-item label="学号">
        <el-input v-model="updatesno" placeholder="请输入学号"></el-input>
      </el-form-item>

      <el-form-item label="姓名">
        <el-input v-model="updatename" placeholder="请输入姓名"></el-input>
      </el-form-item>

      <el-form-item label="性别">
        <el-input v-model="updategender" placeholder="请输入性别"></el-input>
      </el-form-item>

      <el-form-item label="学院">
        <el-input v-model="updateacademy" placeholder="请输入学院"></el-input>
      </el-form-item>

      <el-form-item label="专业">
        <el-input v-model="updatemajor" placeholder="请输入专业"></el-input>
      </el-form-item>

      <el-form-item label="班级">
        <el-input v-model="updateclasses" placeholder="请输入班级"></el-input>
      </el-form-item>

    </el-form>
    <span slot="footer" class="dialog-footer">
      <el-button @click="editstudentdialog = false">取 消</el-button>
      <el-button type="primary">确 定</el-button>
    </span>
  </el-dialog>


  <el-dialog title="删除学生资料" v-model="deletestudentdialog" width="50%">

    <el-form label-width="70px">

      <el-form-item label="学号">
        <el-input v-model="deletesno" placeholder="请输入学号"></el-input>
      </el-form-item>

    </el-form>
    <span slot="footer" class="dialog-footer">
      <el-button @click="deletestudentdialog = false">取 消</el-button>
      <el-button type="primary">确 定</el-button>
    </span>
  </el-dialog> -->
</template>

<script>
// export default {
//   data() {
//     return {
//       sno:ref(''),
//       name:ref(''),
//       gender:ref(''),
//       academy:ref(''),
//       major:ref(''),
//       classes:ref(''),

//       updatesno:ref(''),
//       updatename:ref(''),
//       updategender:ref(''),
//       updateacamedy:ref(''),
//       updatemajor:ref(''),
//       updateclass:ref(''),

//       deletesno:ref(''),

//       addstudentdialog: false,
//       editstudentdialog: false,
//       deletestudentdialog: false,
//       StudentTable:[],
//       input:ref(''),
//     }
//   }
// }
</script>